"use strict";
const BasicsCtl = require("../basics/clz/basectl");
const BeneiftUtil = require("../taobao/beneift");

class HomeCtl extends BasicsCtl {

  constructor(context) {
    super(context);
  }

  /**
   * 发送优惠券
   */
  async send() {
    let { openId, miniappId } = this.params;
    let code = "11180790014";
    let session = "50000800147dzetToObULDqDIFsVMvih3hzemUBvPlBGby9kVxTEE1b0RIM10a179d0D";
    return await BeneiftUtil.send(this.cloud, session, openId, code, miniappId);
  }
}
module.exports = HomeCtl;